# /usr/bin/python
# -*- coding: utf-8 -*-

import os,sys
BASE_DIR = os.path.dirname(os.path.abspath(os.curdir))
sys.path.append(BASE_DIR)
from models.MySQL import MySQL
from conf.setting import templates 
from util.log import get_stream_logger
from models.Zabbix import ZBX

Z = ZBX()
templates = Z.get_template(host="")
with MySQL() as cur:
    for template in templates:
        cur.cur.execute("DELETE FROM tpl WHERE tpl_name='%s'"%template['name'])